/*
 * MiniTabuleiroUI.java
 *
 * Created on 6 de Novembro de 2006, 15:23
 */

package caraacara;

import java.util.Vector;

/**
 *
 * @author  HP
 */
public class MiniTabuleiroUI extends javax.swing.JPanel {
    
    private Vector<MiniCartaUI> cartas = new Vector<MiniCartaUI>();;
    
    /** Creates new form MiniTabuleiroUI */
    public MiniTabuleiroUI() {
        initComponents();
        
        for (int i = 0; i < 24; i++) {
            MiniCartaUI cartaAtual = new MiniCartaUI();
            cartas.add(cartaAtual);
            jPanel1.add(cartaAtual);
        }
        
    }
    
    public void alteraVisibilidade(Vector<Boolean> cartasVisiveis) {
        
        for (int i = 0; i < cartas.size(); i++) {
            cartas.get(i).setVisivel(cartasVisiveis.get(i));
        }
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();

        setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 20));

        setBorder(javax.swing.BorderFactory.createTitledBorder("Tabuleiro do Oponente"));
        jPanel1.setLayout(new java.awt.GridLayout(3, 8));

        jPanel1.setMinimumSize(new java.awt.Dimension(150, 80));
        jPanel1.setPreferredSize(new java.awt.Dimension(150, 80));
        add(jPanel1);

    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
    
}
